<template>
  <div id="app">
    <!--路由的占位符-->
    <div>
      <router-view v-if="showRouter" />
    </div>
  </div>
</template>

<script>
export default {
  name: "App",
  provide() {
    return {
      reload: this.reload,
    };
  },
  data() {
    return {
      showRouter: true,
    };
  },
  methods: {
    reload() {
      this.showRouter = false;
      this.$nextTick(() => {
        this.showRouter = true;
      });
    },
  },
};
</script>

<style lang="scss">
// 全局样式重置
* {
  input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
  }

  input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
  }

  input[type="number"] {
    -moz-appearance: textfield;
    text-align: center;
  }
  margin: 0;
  padding: 0;
  // 盒子内减模式
  box-sizing: border-box;
}
.el-button-group .el-button--primary:first-child {
  height: 39px;
  position: relative;
}
.el-button-group .el-button--primary:last-child {
  border-left: none;
  height: 39px;
  position: absolute;
  padding-left: 0px;
}
// 全局通用样式
ul {
  list-style: none;
}
a {
  text-decoration: none;
}
// =============================================================
// .fixed-box {
//   // 包裹固定定位的盒子，给高度占位，清除固定定位脱标后对其他元素的影响
//   height: 50px;
//   .myheader {
//     // border:1px solid red;
//     width: 100%;
//     height: 50px;
//     position: fixed;
//     // top:0;
//     // 定位层级的问题，轮播图也加了绝对定位
//     z-index: 2;
//   }
// }

.back-top {
  // border:1px solid red;
  a {
    padding: 10px;
    width: 35px;
    height: 130px;
    font-size: 16px;
    border-radius: 3px;

    display: inline-block;
    background-color: #292525;
    color: #efefef;

    position: fixed;
    // calc(100vh - 340px);计算距离，计算宽高
    top: calc(100vh - 180px);
    right: calc(100vw - 1480px);
    display: inline-block;

    &:hover {
      color: orange;
    }
  }
}
</style>
